package com.situ.car.service.Impl;

import com.situ.car.dao.IUserDao;
import com.situ.car.dao.Impl.UserDaoImpl;
import com.situ.car.pojo.entity.User;
import com.situ.car.service.IUserService;

public class UserServiceImpl implements IUserService {
    private IUserDao userDao = new UserDaoImpl();

    @Override
    public User login(String account, String password) {
        return userDao.login(account, password);
    }
    @Override
    public User selectByInfoId(Integer id) {
        return userDao.selectByInfoId(id);
    }

    @Override
    public int updateInfo(User user) {
        return userDao.updateInfo(user);
    }

    @Override
    public User selectAccount(Integer id) {
        return userDao.selectAccount(id);
    }

    @Override
    public User selectPassword(Integer id) {
        return userDao.selectPassword(id);
    }

    @Override
    public void updatePassword(Integer id, String newPassword) {
        userDao.updatePassword(id, newPassword);
    }

    @Override
    public Integer selectByAccount(User user) {
        return userDao.selectByAccount(user);
    }

    @Override
    public void register(User user) {
        userDao.register(user);
    }
}
